package kuangshen.sleep;

import java.util.Date;

/**
 * @program: liangt
 * @description: 模拟倒计时
 * @author: liangt
 * @create: 2021-03-01 16:29
 */
public class TestSleepTow {
    public static void main(String[] args) throws InterruptedException {
        Date time = new Date(System.currentTimeMillis());
        int i = 0;
        i = i++;
        System.out.println(i);
        i = i++ + i; // i = 0 + 1
        System.out.println(i);
        i = i++ + ++i; // i = 1 + 3
        System.out.println(i);
        i = 0;
        i = i--; // i = 0;
        System.out.println("0 = "+i);
        i = i- --i; //i = - （- 1—）
        System.out.println("-1="+i);
        i = 5;
        i = i++ - i--;
        System.out.println("-1 = "+ i);
        //
//        while (true){
//            Thread.sleep(1000);
//            System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
//        }
    }
}
